#在子类中定义进程

import multiprocessing
import time
class MyProcess(multiprocessing.Process):
    def run(self) -> None:#继承继承类，并覆盖了一个新的run方法
        print('calledd run methed by %s'%self.name)
        return

if __name__=='__main__':
    for i in range(10):
        process=MyProcess()
        process.start()
        process.join()